<?php
/**
{
    "id": "INT //",
    "questionTypeId": "INT //题库分类@foreign::tbl_question_type; @search; ",
    "subjectId": "INT //科目@foreign::tbl_subject; @search; ",
    "questionDimensionId": "INT //维度ID@foreign::tbl_question_dimension; @search; ",
    "dimension": "VARCHAR //维度",
    "sort": "INT //排序<br>由小到大",
    "title": "VARCHAR //@search; ",
    "option1": "VARCHAR //1分选项",
    "option2": "VARCHAR //2分选项",
    "option3": "VARCHAR //3分选项",
    "option4": "VARCHAR //4分选项",
    "status": "SMALLINT //状态@status; 3::有效::@admin; 88::删除::@admin; @delete; ",
    "created": "DATETIME //创建时间@noload; @noList; @delete; "
}
 */

class Question extends Base
{
    
	public $id= '';//
	public $questionTypeId= "0";//题库分类@foreign::tbl_question_type;@search;
	public $subjectId= "0";//科目@foreign::tbl_subject;@search;
	public $questionDimensionId= "0";//维度ID@foreign::tbl_question_dimension;@search;
	public $dimension= NULL;//维度
	public $sort= "0";//排序<br>由小到大
	public $title= '';//@search;
	public $option1= NULL;//1分选项
	public $option2= NULL;//2分选项
	public $option3= NULL;//3分选项
	public $option4= NULL;//4分选项
	public $status= "3";//状态@status;3::有效::@admin;88::删除::@admin;@delete;
	public $created= 'CURRENT_TIMESTAMP';//创建时间@noload;@noList;@delete;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_question';
    }
    
    public  function key(){
        return 'id';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return [];
    }
            
    public static  function deleteField()
    {
        return array (  0 => 'status',  1 => 'created',);
    }
            
    public function className()
    {
        return 'Question';
    }
    
    public  function field()
    {
        return array (  'id' =>   array (    0 => 'INT',    1 => 10,    2 => '',  ),  'questionTypeId' =>   array (    0 => 'INT',    1 => 6,    2 => '题库分类@foreign::tbl_question_type;@search;',  ),  'subjectId' =>   array (    0 => 'INT',    1 => 11,    2 => '科目@foreign::tbl_subject;@search;',  ),  'questionDimensionId' =>   array (    0 => 'INT',    1 => 11,    2 => '维度ID@foreign::tbl_question_dimension;@search;',  ),  'dimension' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '维度',  ),  'sort' =>   array (    0 => 'INT',    1 => 11,    2 => '排序<br>由小到大',  ),  'title' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '@search;',  ),  'option1' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '1分选项',  ),  'option2' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '2分选项',  ),  'option3' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '3分选项',  ),  'option4' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '4分选项',  ),  'status' =>   array (    0 => 'SMALLINT',    1 => 6,    2 => '状态@status;3::有效::@admin;88::删除::@admin;@delete;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建时间@noload;@noList;@delete;',  ),);
    }


}